package org.opicasso.cheese.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Cart implements Serializable {

	private static final long serialVersionUID = 5238911339925416208L;
	private List<Cheese> cheeses = new ArrayList<Cheese>();
	private Address billingAddress = new Address();

	public Address getBillingAddress() {
		return billingAddress;
	}

	public float getTotal() {
		float total = 0;
		for (Cheese ch : cheeses) {
			total += ch.getPrice();
		}
		return total;
	}

	public List<Cheese> getCheeses() {
		return cheeses;
	}

}
